<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div>哈哈</div>
    <div>222</div>
    <div class="box">黑恶欸</div>
    <div id="hh"></div>
    <script>
        // 1.获取匹配的第一个元素  哈哈那个元素
        const nav = document.querySelector('div')//记住要打引号
        const k = document.querySelector('#hh')

        const l = document.querySelectorAll('div')
    </script>
</body>

</html>